Skip to content

[Agent Builder] Attachment inline rendering and UI actions#253329

Closed
chrisbmar wants to merge 11 commits intoelastic:mainfrom
chrisbmar:ab-attachment-inline-rendering-12939
Closed

[Agent Builder] Attachment inline rendering and UI actions#253329
chrisbmar wants to merge 11 commits intoelastic:mainfrom
chrisbmar:ab-attachment-inline-rendering-12939

Conversation

@chrisbmar
Copy link
Copy Markdown
Contributor

@chrisbmar chrisbmar commented Feb 16, 2026

closes https://github.com/elastic/search-team/issues/12939

This PR implements the plumbing for the acceptance criteria below, it does not include any UI.

You can see in the following video that the attachment and UI definition is reaching the chat response:

Screen.Recording.2026-02-16.at.17.46.33.mov

Implement:

  • the ability for the agent to return an attachment ID
  • the ability for solutions to define a custom render function in the attachment UI registry
  • the ability solutions to define UI actions in the attachment UI registry

@chrisbmar chrisbmar self-assigned this Feb 16, 2026
@chrisbmar chrisbmar added backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes feature:agent-builder Identify agent builder functionalities to be grouped together for release notes labels Feb 16, 2026
@chrisbmar
Copy link
Copy Markdown
Contributor Author

/ci


import { renderAttachmentElement } from '@kbn/agent-builder-common/tools/custom_rendering';

export const renderAttachmentPrompt = () => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppisljar lets discuss tomorrow how best to implement this attachment rendering prompt for now. I also think we have a bug with the attachment_add tool always thinking that built in attachments are read-only, it throws an error.

Comment on lines +34 to +41
const isExperimentalFeaturesEnabled = settings?.client.get<boolean>(
AGENT_BUILDER_EXPERIMENTAL_FEATURES_SETTING_ID,
false
);

if (isExperimentalFeaturesEnabled === false) {
return null;
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc. @joemcelroy whilst I've yet to implement the actual UI (future PR), I'd like to keep this behind the experimental feature flag just to ensure if the agent does include an <attachment_renderer /> XML tag that it doesn't show anything in the UI as we iteratively work towards including the final design - thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep this is good

@chrisbmar
Copy link
Copy Markdown
Contributor Author

/ci

@chrisbmar
Copy link
Copy Markdown
Contributor Author

/ci

@chrisbmar chrisbmar marked this pull request as ready for review February 17, 2026 07:07
@chrisbmar chrisbmar requested a review from a team as a code owner February 17, 2026 07:07
@chrisbmar chrisbmar added release_note:skip Skip the PR/issue when compiling release notes and removed release_note:feature Makes this part of the condensed release notes labels Feb 18, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #18 / @ess @serverless @serverlessQA SecuritySolution Timeline @skipInServerless Timeline migrations 8.0 id migration "before all" hook in "8.0 id migration"

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
agentBuilder 1546 1548 +2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/agent-builder-browser 15 17 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
agentBuilder 569.3KB 571.5KB +2.1KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
@kbn/agent-builder-browser 0 3 +3

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
agentBuilder 87.4KB 87.5KB +47.0B
Unknown metric groups

API count

id before after diff
@kbn/agent-builder-browser 33 37 +4

History

cc @chrisbmar

@chrisbmar chrisbmar requested review from a team as code owners February 19, 2026 09:05
@chrisbmar chrisbmar requested review from a team as code owners February 19, 2026 09:05
@botelastic botelastic Bot added Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation Team:One Workflow Team label for One Workflow (Workflow automation) labels Feb 19, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-presentation-team (Team:obs-presentation)

@chrisbmar chrisbmar force-pushed the ab-attachment-inline-rendering-12939 branch from c1f3975 to 6689c69 Compare February 19, 2026 09:06
@chrisbmar
Copy link
Copy Markdown
Contributor Author

chrisbmar commented Feb 19, 2026

silly rebase, closing and opening a new PR. #253913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting feature:agent-builder Identify agent builder functionalities to be grouped together for release notes release_note:skip Skip the PR/issue when compiling release notes Team:obs-presentation Focus: APM UI, Infra UI, Hosts UI, Universal Profiling, Obs Overview and left Navigation Team:One Workflow Team label for One Workflow (Workflow automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants